//
//  BaseAlertController.swift
//  weile
//
//  Created by LKM on 16/11/8.
//  Copyright © 2016年 LKM. All rights reserved.
//

import UIKit
import SnapKit
/**
 目前我不知道怎么从 xib实例化alter
 */
class BaseAlertController: UIAlertController {

    
    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
        ViewHelp.removeAllSubView(self.view)
        self.view.addSubview(getContentWrapView())
        getContentWrapView().snp.makeConstraints { (cm:ConstraintMaker) in
            cm.top.equalToSuperview()
            cm.bottom.equalToSuperview()
            cm.left.equalToSuperview()
            cm.right.equalToSuperview()
        }
        self.view.height=UIScreen.main.bounds.size.height;
    }
    
    func getContentWrapView() -> UIView{
        preconditionFailure("重写")
//        return nil;
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
